

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Command line options of the teach_sparse main program &mdash; quippy 7ea04c5+ documentation</title>
  

  
  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "math|output_area", "processEscapes": true, "ignoreClass": "document", "inlineMath": [["$", "$"], ["\\(", "\\)"]]}})</script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> quippy
          

          
            
            <img src="_static/hybrid.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                7ea04c5+
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
    
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to <code class="docutils literal notranslate"><span class="pre">quippy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation of QUIP and quippy</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="quippy.html">Quippy library reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualisation.html">Visualisation Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Command line options of the teach_sparse main program</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#main-options">Main options</a></li>
<li class="toctree-l2"><a class="reference internal" href="#gap-options">GAP options</a></li>
</ul>
</li>
</ul>

            
          
    <p></p>
    <ul>
        <li><a href="genindex.html">Index</a></li>
        <li><a href="py-modindex.html">Module Index</a></li>
        <li><a href="search.html">Search Page</a></li>
        <li><a href="_modules/index.html">Module Source Code</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">quippy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>Command line options of the teach_sparse main program</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/teach_sparse.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  
<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
    margin-bottom: 19px;  /* padding has already 5px */
}

/* ... except between code cells! */
.nblast + .nbinput {
    margin-top: -19px;
}

.admonition > p:before {
    margin-right: 4px;  /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
    text-align: unset;
}
</style>
<div class="section" id="command-line-options-of-the-teach-sparse-main-program">
<h1>Command line options of the teach_sparse main program<a class="headerlink" href="#command-line-options-of-the-teach-sparse-main-program" title="Permalink to this headline">¶</a></h1>
<div class="section" id="main-options">
<h2>Main options<a class="headerlink" href="#main-options" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="quippy.teach_sparse_parse_command_line">
<code class="descclassname">quippy.</code><code class="descname">teach_sparse_parse_command_line</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.teach_sparse_parse_command_line" title="Permalink to this definition">¶</a></dt>
<dd><p>This subroutine parses the main command line options.</p>
<p class="rubric">args_str options</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="6%" />
<col width="17%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Type</th>
<th class="head">Default</th>
<th class="head">Comments</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>at_file</td>
<td>str</td>
<td>//MANDATORY//</td>
<td>XYZ file with teaching configurations</td>
</tr>
<tr class="row-odd"><td>config_type_parameter_name</td>
<td>str</td>
<td>config_type</td>
<td>Identifier of property determining the
type of input data in the at_file</td>
</tr>
<tr class="row-even"><td>config_type_sigma</td>
<td>str</td>
<td>None</td>
<td>What sigma values to choose for each
type of data. Format:
{type:energy:force:virial:hessian}</td>
</tr>
<tr class="row-odd"><td>core_ip_args</td>
<td>str</td>
<td>None</td>
<td>QUIP init string for a potential to
subtract from data (and added back
after prediction)</td>
</tr>
<tr class="row-even"><td>core_param_file</td>
<td>str</td>
<td>quip_params.xml</td>
<td>QUIP XML file for a potential to
subtract from data (and added back
after prediction)</td>
</tr>
<tr class="row-odd"><td>default_sigma</td>
<td>float</td>
<td>//MANDATORY//</td>
<td>Error in [energies forces virials
hessians]</td>
</tr>
<tr class="row-even"><td>do_copy_at_file</td>
<td>bool</td>
<td>True</td>
<td>Do copy the at_file into the GAP XML
file (should be set to False for NetCDF
input).</td>
</tr>
<tr class="row-odd"><td>do_ip_timing</td>
<td>bool</td>
<td>False</td>
<td>To enable or not timing of the
interatomic potential.</td>
</tr>
<tr class="row-even"><td>e0_method</td>
<td>str</td>
<td>isolated</td>
<td>Method to determine e0, if not
explicitly specified. Possible options:
isolated (default, each atom present in
the XYZ needs to have an isolated
representative, with a valid energy),
average (e0 is the average of all total
energies across the XYZ)</td>
</tr>
<tr class="row-odd"><td>e0_offset</td>
<td>float</td>
<td>0.0</td>
<td>Offset of baseline. If zero, the offset
is the average atomic energy of the
input data or the e0 specified
manually.</td>
</tr>
<tr class="row-even"><td>energy_parameter_name</td>
<td>str</td>
<td>energy</td>
<td>Name of energy property in the at_file
that describes the data</td>
</tr>
<tr class="row-odd"><td>force_parameter_name</td>
<td>str</td>
<td>force</td>
<td>Name of force property in the at_file
that describes the data</td>
</tr>
<tr class="row-even"><td>gap</td>
<td>str</td>
<td>//MANDATORY//</td>
<td>Initialisation string for GAPs</td>
</tr>
<tr class="row-odd"><td>gp_file</td>
<td>str</td>
<td>gp_new.xml</td>
<td>Output XML file</td>
</tr>
<tr class="row-even"><td>hessian_delta</td>
<td>float</td>
<td>1.0e-2</td>
<td>Delta to use in numerical
differentiation when obtaining second
derivative for the Hessian covariance</td>
</tr>
<tr class="row-odd"><td>hessian_parameter_name</td>
<td>str</td>
<td>hessian</td>
<td>Name of hessian property in the at_file
that describes the data</td>
</tr>
<tr class="row-even"><td>local_property_parameter_name</td>
<td>str</td>
<td>local_property</td>
<td>Name of local_property in the at_file
that describes the data</td>
</tr>
<tr class="row-odd"><td>rnd_seed</td>
<td>int</td>
<td>-1</td>
<td>Random seed.</td>
</tr>
<tr class="row-even"><td>sigma_parameter_name</td>
<td>str</td>
<td>sigma</td>
<td>Sigma parameters (error hyper) for a
given configuration in the database.
Overrides the command line sigmas. In
the XYZ, it must be prepended by
<a href="#id1"><span class="problematic" id="id2">energy_</span></a>, <a href="#id3"><span class="problematic" id="id4">force_</span></a>, <a href="#id5"><span class="problematic" id="id6">virial_</span></a> or <a href="#id7"><span class="problematic" id="id8">hessian_</span></a></td>
</tr>
<tr class="row-odd"><td>sigma_per_atom</td>
<td>bool</td>
<td>True</td>
<td>Interpretation of the energy and virial
sigmas specified in &gt;&gt;default_sigma&lt;&lt;
and &gt;&gt;config_type_sigma&lt;&lt;. If &gt;&gt;T&lt;&lt;,
they are interpreted as per-atom
errors, and the variance will be scaled
according to the number of atoms in the
configuration. If &gt;&gt;F&lt;&lt; they are
treated as absolute errors and no
scaling is performed. NOTE: sigmas
specified on a per-configuration basis
(see &gt;&gt;sigma_parameter_name&lt;&lt;) are
always absolute.</td>
</tr>
<tr class="row-even"><td>sparse_jitter</td>
<td>float</td>
<td>1.0e-10</td>
<td>Intrisic error of atomic/bond energy,
used to regularise the sparse
covariance matrix</td>
</tr>
<tr class="row-odd"><td>sparse_separate_file</td>
<td>bool</td>
<td>True</td>
<td>Save sparse coordinates data in
separate file</td>
</tr>
<tr class="row-even"><td>sparse_use_actual_gpcov</td>
<td>bool</td>
<td>False</td>
<td>Use actual GP covariance for
sparsification methods</td>
</tr>
<tr class="row-odd"><td>sparsify_only_no_fit</td>
<td>bool</td>
<td>False</td>
<td>If true, sparsification is done, but no
fitting. print the sparse index by
adding print_sparse_index=file.dat to
the descriptor string.</td>
</tr>
<tr class="row-even"><td>template_file</td>
<td>str</td>
<td>template.xyz</td>
<td>Template XYZ file for initialising
object</td>
</tr>
<tr class="row-odd"><td>verbosity</td>
<td>str</td>
<td>NORMAL</td>
<td>Verbosity control. Options: NORMAL,
VERBOSE, NERD, ANAL.</td>
</tr>
<tr class="row-even"><td>virial_parameter_name</td>
<td>str</td>
<td>virial</td>
<td>Name of virial property in the at_file
that describes the data</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">teach_sparse_parse_command_line</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/GAP-filler/teach_sparse_module.f95">src/GAP-filler/teach_sparse_module.f95</a>.</p>
</dd></dl>

</div>
<div class="section" id="gap-options">
<h2>GAP options<a class="headerlink" href="#gap-options" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="quippy.teach_sparse_parse_gap_str">
<code class="descclassname">quippy.</code><code class="descname">teach_sparse_parse_gap_str</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#quippy.teach_sparse_parse_gap_str" title="Permalink to this definition">¶</a></dt>
<dd><p>This subroutine parses the options given in the gap string, for each GAP.</p>
<p class="rubric">args_str options</p>
<table border="1" class="docutils">
<colgroup>
<col width="32%" />
<col width="6%" />
<col width="15%" />
<col width="47%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Type</th>
<th class="head">Default</th>
<th class="head">Comments</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>add_species</td>
<td>bool</td>
<td>False</td>
<td>Create species-specific descriptor,
using the descriptor string as a
template.</td>
</tr>
<tr class="row-odd"><td>config_type_n_sparse</td>
<td>str</td>
<td>None</td>
<td>Number of sparse points in each config
type. Format: {type1:50:type2:100}</td>
</tr>
<tr class="row-even"><td>covariance_type</td>
<td>str</td>
<td>//MANDATORY//</td>
<td>Type of covariance function to use.
Available: ARD_SE, DOT_PRODUCT,
BOND_REAL_SPACE, PP (piecewise
polynomial)</td>
</tr>
<tr class="row-odd"><td>delta</td>
<td>float</td>
<td>//MANDATORY//</td>
<td>Set the standard deviation of the
Gaussian process. Typically this would
be set to the standard deviation (i.e.
root mean square) of the function that
is approximated with the Gaussian
process.</td>
</tr>
<tr class="row-even"><td>f0</td>
<td>float</td>
<td>0.0</td>
<td>Set the mean of the Gaussian process.
Defaults to 0.</td>
</tr>
<tr class="row-odd"><td>mark_sparse_atoms</td>
<td>bool</td>
<td>False</td>
<td>Reprints the original xyz file after
sparsification process. sparse propery
added, true for atoms associated with a
sparse point.</td>
</tr>
<tr class="row-even"><td>n_sparse</td>
<td>int</td>
<td>0</td>
<td>Number of sparse points to use in the
sparsification of the Gaussian process</td>
</tr>
<tr class="row-odd"><td>print_sparse_index</td>
<td>str</td>
<td>None</td>
<td>If given, after determinining the
sparse points, their 1-based indices
are appended to this file</td>
</tr>
<tr class="row-even"><td>sparse_method</td>
<td>str</td>
<td>RANDOM</td>
<td>Sparsification method. RANDOM(default),
PIVOT, CLUSTER, UNIFORM, KMEANS,
COVARIANCE, NONE, FUZZY, FILE,
INDEX_FILE, CUR_COVARIANCE, CUR_POINTS</td>
</tr>
<tr class="row-odd"><td>theta_fac</td>
<td>str</td>
<td>1.0</td>
<td>Set the width of Gaussians for the
ARD_SE and PP kernel by multiplying the
range of each descriptor by theta_fac.
Can be a single number or different for
each dimension. For multiple theta_fac
separate each value by whitespaces.</td>
</tr>
<tr class="row-even"><td>theta_file</td>
<td>str</td>
<td>None</td>
<td>Set the width of Gaussians for the
ARD_SE kernel from a file. There should
be as many real numbers as the number
of dimensions, in a single line</td>
</tr>
<tr class="row-odd"><td>theta_uniform</td>
<td>float</td>
<td>0.0</td>
<td>Set the width of Gaussians for the
ARD_SE and PP kernel, same in each
dimension.</td>
</tr>
<tr class="row-even"><td>unique_descriptor_tolerance</td>
<td>float</td>
<td>1.0e-10</td>
<td>Descriptor tolerance when filtering out
duplicate data points</td>
</tr>
<tr class="row-odd"><td>unique_hash_tolerance</td>
<td>float</td>
<td>1.0e-10</td>
<td>Hash tolerance when filtering out
duplicate data points</td>
</tr>
<tr class="row-even"><td>zeta</td>
<td>float</td>
<td>1.0</td>
<td>Exponent of soap type dot product
covariance kernel</td>
</tr>
</tbody>
</table>
<p class="rubric">References</p>
<p>Routine is wrapper around Fortran routine <code class="docutils literal notranslate"><span class="pre">teach_sparse_parse_gap_str</span></code> defined in file <a class="reference external" href="https://github.com/libAtoms/QUIP/blob/public/src/GAP-filler/teach_sparse_module.f95">src/GAP-filler/teach_sparse_module.f95</a>.</p>
</dd></dl>

<dl class="docutils">
<dt><cite>sparse_method</cite> options are:</dt>
<dd><ul class="first last simple">
<li>RANDOM: default, chooses n_sparse random datapoints</li>
<li>PIVOT: based on the full covariance matrix finds the n_sparse “pivoting” points</li>
<li>CLUSTER: based on the full covariance matrix performs a k-medoid clustering into n_sparse clusters, returning the medoids</li>
<li>UNIFORM: makes a histogram of the data based on n_sparse and returns a data point from each bin</li>
<li>KMEANS: k-means clustering based on the data points</li>
<li>COVARIANCE: greedy data point selection based on the sparse covariance matrix, to minimise the GP variance of all datapoints</li>
<li>UNIQ: selects unique datapoints from the dataset</li>
<li>FUZZY: fuzzy k-means clustering</li>
<li>FILE: reads sparse points from a file</li>
<li>INDEX_FILE: reads indices of sparse points from a file</li>
<li>CUR_COVARIANCE: CUR, based on the full covariance matrix</li>
<li>CUR_POINTS: CUR, based on the datapoints</li>
</ul>
</dd>
</dl>
</div>
</div>


           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2008-2016, James Kermode

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>